package configdto

import (
	"gitee.com/ichub/goconfig/common/base/baseiface"
	"gitee.com/ichub/goconfig/common/basedi"
)

const singleNameConfigContext = "ConfigContext"

// init
// register
// load
func init() {
	registerBeanConfigContext()
}

// register ConfigContext
func registerBeanConfigContext() {
	basedi.RegisterLoadBean(singleNameConfigContext, LoadConfigContext)
}

func FindBeanConfigContext() *ConfigContext {
	return basedi.FindBean(singleNameConfigContext).(*ConfigContext)
}

func LoadConfigContext() baseiface.ISingleton {
	return NewConfigContext()
}
